package data;

public interface UserProvider {

	/**
	 * Returnerer et User objekt hvis brugernavn/passwordHash stemmer overens
	 * 
	 * @param username
	 * @param passwordHash
	 * @return
	 * @throws UserException
	 */
	public User authenticateUser(String username, PasswordHash hash) throws UserException;
	
	/**
	 * Kaster en exception hvis brugeren ikke kan oprettes
	 * @param newUser
	 * @return
	 * @throws UserException
	 */
	public void addUser(User newUser, PasswordHash hash) throws UserException;
	
}
